let path  = require("path");
let HtmlWebpackPlugin = require("html-webpack-plugin");
let HtmlPlugin = new HtmlWebpackPlugin({
    filename:"index.html",
    template:"./public/index.html"
})

module.exports = {
    mode:"production",
    entry:'./src/index.js',
    output:{
        filename:"build.js",
        path:path.resolve(__dirname,"build")
    },
    module:{
        rules:[
            {
                test:/\.css$/i,
                use:["style-loader",'css-loader']
            }
        ]
    },
    plugins:[HtmlPlugin],
}